#{extends 'main.html' /} #{set title:'Home' /}#{ifnot entities}

<p>No Entities</p>

#{/ifnot}
<!-- Ebrahim Zidan -->

<script>
	function passActionItem(box, entityId, actionItemId) {
		$.get('@{ActionPlanController.addEntity(entityId,actionItemId)}')
		var elm = document.getElementById(entityId)
		elm.style.display = "none"	
		$('#one').jGrowl('Related')

	}
</script>
<ul>
	#{list items:entities, as:'Entities'}

	<DIV ID=${Entities.id}>
		<p>
		<li>Title : ${Entities.name}</li>
		<li>Views : ${Entities.views}</li> <input type="button" value="Relate"
			onclick="javascript:passActionItem(this,${Entities.id},${actionItemId})" />
		</p>

	</DIV>

	<br> #{/list}

</ul>
<input type="button" onClick="history.back();" value="<-- Back">